package com.petadoption.serverclient.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.petadoption.serverclient.entity.Product;
import com.petadoption.serverclient.mapper.ProductMapper;
import com.petadoption.serverclient.service.IProductService;
import com.petadoption.serverclient.vo.ProductVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 汪仕杰
 * @since 2023-08-28
 */
@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements IProductService {
    @Resource
    private ProductMapper productMapper;

    @Override
    public List<ProductVO> findProductAll() {
        return productMapper.findProductAll();
    }

    @Override
    public List<ProductVO> findProduct(String parameter) {
        return productMapper.findProduct(parameter);
    }

    @Override
    public ProductVO findProductById(Integer productId) {
        return productMapper.findProductById(productId);
    }
}
